package main

import "fmt"

type Actor struct {}

func (a *Actor) onEvent(param interface{}) {
	fmt.Println("actor event :", param)
}

//全局事件
func globalEvent(param interface{})  {
	fmt.Println("global event:", param)
}

func main() {
	a := new(Actor)
	//注册名为onSkill的回调
	registerEvent("onSkill", a.onEvent)
	//再次在onSkill 上注册全区事件
	registerEvent("onSkill", globalEvent)
	callEvent("onSkill", 100)
}

